//
// Created by tang on 23-2-8.
//

#ifndef TIMESPAN_HPP
#define TIMESPAN_HPP

#include "sdk_config.h"

using pi_time_t = f64;

struct PI_API time_span final {
    inline explicit time_span(pi_time_t time): time{time} {}
    inline operator pi_time_t() const { return time; }
    [[nodiscard]] inline pi_time_t seconds() const { return time; }
    [[nodiscard]] inline pi_time_t millis() const { return time * 1000.f; }
private:
    pi_time_t time;
};

pi_time_t platform_get_time();

#endif // TIMESPAN_HPP
